<template>
    <div>
        <h2>用户管理</h2>
        <List :users="users"></List>
        <UserRole></UserRole>
    </div>
</template>
<script setup>
import { ref ,onMounted } from 'vue';
import { listUser } from '../../service/user';
import List from './List.vue';
import UserRole from './UserRole.vue';
const users = ref([]);

async function show(current = 1,pageSize = 5){
    let res = await listUser(current,pageSize);
    users.value = res.data.list;
}
onMounted(() => {
    show();
})
</script>
<style></style>